<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>手风琴</title>
  </head>
  <style>
    .loader {
      margin: 250px auto 0;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .slider {
      background-color: #fff;
      border: 1px solid rgba(128, 128, 128, 0.276);
      height: 80px;
      width: 20px;
      margin: 0 15px;
      border-radius: 30px;
      box-shadow: inset -5px -5px 10px #0000001a, inset 5px 5px 10px #0000001a;
      position: relative;
      overflow: hidden;
    }
    .slider::before {
      content: " ";
      position: absolute;
      top: 0;
      left: 0;
      height: 80px;
      width: 20px;
      background-color: #2697f3;
    }
    .slider::before {
      animation: animate_2 2.5s ease-in-out infinite;
    }
    .slider::before {
      animation-delay: calc(-0.5s * var(--i));
    }
    @keyframes animate_2 {
      0% {
        transform: translateY(80px);
        filter: hue-rotate(0deg);
      }
      50% {
        transform: translateY(20px);
      }
      100% {
        transform: translateY(80px);
        filter: hue-rotate(360deg); /* 改变图像的整体色调 */
      }
    }
  </style>
  <body>
    <div class="loader">
      <div class="slider" style="--i: 0"></div>
      <div class="slider" style="--i: 1"></div>
      <div class="slider" style="--i: 2"></div>
      <div class="slider" style="--i: 3"></div>
      <div class="slider" style="--i: 4"></div>
    </div>
  </body>
</html>
